-
Notifications
You must be signed in to change notification settings - Fork 149
deps: Update to latest badger version #3482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2a3222f to
087bc10
Compare
087bc10 to
1cb7f62
Compare
35fcec3 to
bf78e7c
Compare
|
I don't believe just setting the old db aside and creating a new one is OK. There needs to be some sort of migration. I suggest making a new db directory with the version in the directory name. (not sure if this should be the module's major version, or the current manifest version of 8, they have done some wacky versioning in the past but it appears like they might be updating both versions in lockstep going forward?) When the current version does not exist, look for the most recent previous version, and then do the Backup/Load. |
9f76a57 to
553cc37
Compare
|
Updating the old db, seems to be working https://github.com/decred/dcrdex/compare/9f76a57b92e382375353796734e1bae44bbf92a4..553cc37d628a95044498d86b9474a0adc4d91f74 So, versioning from now, would be best to make separate folders like, v4, v5, makes sense... We can also just worry about that next update. But idk if we can know the current version easily. |
|
Oh sorry, must be doing something wrong atm |
2681781 to
614222c
Compare
| tempF.Close() | ||
| tempF, err = os.OpenFile(tempPath, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0644) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would think you could just do tempF.Sync() but that does not seem to work.
|
Working now, thinking about future upgrades. |
2f3e852 to
5d6b024
Compare
|
Adds a version tag to the end of database paths so we know before attempting to open which version of badger the database is currently created with. |
5d6b024 to
5603360
Compare
|
Adjusted so New can point at an existing v4 db when using the new lexi tool. |
The truncate option does not exist in this version, so this also removes the ErrTruncateNeeded handling.
934d81e to
7d31ddc
Compare
martonp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
7d31ddc to
5344434
Compare
|
Just changed one comment https://github.com/decred/dcrdex/compare/7d31ddcf0505880ab422a151eb698bfca1dc9a3b..53444349878a67448149b2a9024c797b39d8cb41 merging... |
Moves old db aside and warns.